package com.ruoyi.web.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.web.entity.ApiCashFlow;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.ApiCashFlowMapper;
import com.ruoyi.web.service.IApiCashFlowService;

/**
 * 充值流水信息Service业务层处理
 * 
 * @author youwei
 * @date 2023-11-28
 */
@Service
public class ApiCashFlowServiceImpl implements IApiCashFlowService 
{
    @Autowired
    private ApiCashFlowMapper apiCashFlowMapper;

    /**
     * 查询充值流水信息
     * 
     * @param id 充值流水信息主键
     * @return 充值流水信息
     */
    @Override
    public ApiCashFlow selectApiCashFlowById(Long id)
    {
        return apiCashFlowMapper.selectApiCashFlowById(id);
    }

    /**
     * 查询充值流水信息列表
     * 
     * @param apiCashFlow 充值流水信息
     * @return 充值流水信息
     */
    @Override
    public List<ApiCashFlow> selectApiCashFlowList(ApiCashFlow apiCashFlow)
    {
        return apiCashFlowMapper.selectApiCashFlowList(apiCashFlow);
    }

    /**
     * 新增充值流水信息
     * 
     * @param apiCashFlow 充值流水信息
     * @return 结果
     */
    @Override
    public int insertApiCashFlow(ApiCashFlow apiCashFlow)
    {
        apiCashFlow.setCreateTime(DateUtils.getNowDate());
        return apiCashFlowMapper.insertApiCashFlow(apiCashFlow);
    }

    /**
     * 修改充值流水信息
     * 
     * @param apiCashFlow 充值流水信息
     * @return 结果
     */
    @Override
    public int updateApiCashFlow(ApiCashFlow apiCashFlow)
    {
        apiCashFlow.setUpdateTime(DateUtils.getNowDate());
        return apiCashFlowMapper.updateApiCashFlow(apiCashFlow);
    }

    /**
     * 批量删除充值流水信息
     * 
     * @param ids 需要删除的充值流水信息主键
     * @return 结果
     */
    @Override
    public int deleteApiCashFlowByIds(Long[] ids)
    {
        return apiCashFlowMapper.deleteApiCashFlowByIds(ids);
    }

    /**
     * 删除充值流水信息信息
     * 
     * @param id 充值流水信息主键
     * @return 结果
     */
    @Override
    public int deleteApiCashFlowById(Long id)
    {
        return apiCashFlowMapper.deleteApiCashFlowById(id);
    }
}
